package com.ruoyi.product.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 商品列表对象 product
 *
 * @author 林道敬
 * @date 2025-01-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("product")
public class Product extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @TableId
    /** $column.columnComment */
    private String id;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 封面图 */
    @Excel(name = "封面图")
    private String coverImg;

    /** 详情 */
    @Excel(name = "详情")
    private String detail;

    /** 老价格 */
    @Excel(name = "老价格")
    private BigDecimal oldAmount;

    /** 新价格 */
    @Excel(name = "新价格")
    private BigDecimal amount;

    /** 库存 */
    @Excel(name = "库存")
    private Long stock;

    /** 锁定库存 */
    @Excel(name = "锁定库存")
    private Long lockStock;

    /** 重量 */
    @Excel(name = "重量")
    private BigDecimal weight;

    public BigDecimal getWeight() {
        return weight;
    }

    public void setWeight(BigDecimal weight) {
        this.weight = weight;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getTitle()
    {
        return title;
    }
    public void setCoverImg(String coverImg)
    {
        this.coverImg = coverImg;
    }

    public String getCoverImg()
    {
        return coverImg;
    }
    public void setDetail(String detail)
    {
        this.detail = detail;
    }

    public String getDetail()
    {
        return detail;
    }
    public void setOldAmount(BigDecimal oldAmount)
    {
        this.oldAmount = oldAmount;
    }

    public BigDecimal getOldAmount()
    {
        return oldAmount;
    }
    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }
    public void setStock(Long stock)
    {
        this.stock = stock;
    }

    public Long getStock()
    {
        return stock;
    }
    public void setLockStock(Long lockStock)
    {
        this.lockStock = lockStock;
    }

    public Long getLockStock()
    {
        return lockStock;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("coverImg", getCoverImg())
            .append("detail", getDetail())
            .append("oldAmount", getOldAmount())
            .append("amount", getAmount())
            .append("stock", getStock())
            .append("createTime", getCreateTime())
            .append("lockStock", getLockStock())
            .toString();
    }
}
